<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
		<meta name="format-detection" content="telephone=no">
		<meta name="format-detection" content="address=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="browsermode" content="application" />
		<meta name="x5-page-mode" content="app" />
		<title>还款详情</title>
		<meta charset="utf-8" />
		<link href="../css/main.css?rev=@@hash" rel="stylesheet" />
		<style>
			body {
				width: 3.75rem;
				background: #CEDEDD;
				position: relative;
			}
			
			.cells_title {
				margin: 0;
				padding: .12rem .4rem;
				font-size: .16rem;
				height: .22rem;
				color: rgb(68, 74, 89);
			}
			
			.cells_title a {
				display: block;
				float: left;
				font-size: .16rem;
				height: .22rem;
				font-weight: 700;
			}
			
			.cells_title span {
				display: block;
				float: left;
				font-size: .13rem;
				height: .22rem;
				line-height: .22rem;
				margin-left: .2rem;
				color: rgb(136, 136, 136)
			}
			
			.operatorContent {
				width: 100%;
				background: transparent;
				overflow: hidden;
			}
			
			.txt {
				text-align: right;
			}
			
			.txt::-webkit-input-placeholder {
				font-size: .12rem;
				color: #2F3032;
			}
			
			.inputTxt {
				color: #4AABA3;
			}
			
			.inputTxt::-webkit-input-placeholder {
				color: #4AABA3;
			}
			
			.getCode {
				color: #2AD2C8;
				font-size: .12rem;
			}
			
			.cell_ft img {
				display: block;
				;
				width: .2rem;
				height: .1rem;
			}
			
			.tip {
				line-height: .2rem;
				height: .2rem;
				overflow: hidden;
				margin: .2rem .4rem;
			}
			
			.tip span {
				display: block;
				float: left;
				font-size: .12rem;
				line-height: .2rem;
				height: .2rem;
			}
			
			.tip i {
				display: block;
				width: .12rem;
				height: .12rem;
				margin: 0.02rem .04rem;
				float: left;
			}
			
			.tip i img {
				width: 100%;
			}
					
			.cell {
				padding: .11rem .1rem;
			}
			
			.cell:before {
				content: " ";
				position: absolute;
				left: .1rem;
				top: 0;
				width: 3.23rem;
				height: 1px;
				border-top: 1px solid #E4E4E4;
				color: #E4E4E4;
				-webkit-transform-origin: 0 0;
				transform-origin: 0 0;
				-webkit-transform: scaleY(.5);
				transform: scaleY(.5);
			}
			
			.submitBtn {
				width: 100%;
				position: static;
				font-size: .15rem;
				margin: .3rem auto 0;
				background: #1EB97E;
				box-shadow: 0 0.03rem 0.06rem #AEDEC6;
				border-radius: .25rem;
			}
			
			.cells_line {
				height: .1rem;
				width: 100%;
			}
			
			.repaymentContent {
				height: 1.3rem;
				background: linear-gradient(#11B1B2, #57CD91, #CEDEDD);
				padding: .1rem .16rem;
			}
			
			.repayTop1 {
				height: .5rem;
				line-height: .5rem;
				font-size: .14rem;
				text-align: center;
				color: #29958C;
				background: #fff;
				border-radius: .1rem .1rem 0 0;
			}
			
			.repayTop2 {
				height: .3rem;
				line-height: .3rem;
				text-align: center;
				color: #5E5E5E;
				padding: .1rem 0 .3rem;
				background: #fff;
			}
			
			.repayTop2Text {
				height: .2rem;
				font-size: .1rem;
				transform: scale(.8);
				-webkit-transform: scale(.8);
				padding-top: .02rem;
			}
			
			.repayTop2 span {
				font-size: .24rem!important;
				color: #1EB97E;
				font-weight: 600;
				padding-right: .05rem;
			}
			
			.repayTop3 {
				height: .45rem;
				line-height: .2rem;
				padding: .15rem .1rem;
				font-size: .12rem;
				color: #29958C;
				text-align: left;
				background: rgba(255, 255, 255, .8);
				border-radius: .1rem;
			}
			
			.cell_hd {
				font-size: .12rem;
				color: #5F5F5F;
			}
			
			.repaymentDetailContent {
				width: 90%;
				background: #fff0;
				margin: -.55rem auto;
				position: relative;
			}
			
			.cells {
				position: static;
				background: #fff;
			}
			
			.cell_Icon {
				float: right;
				border: solid .01rem #cededd;
				width: .14rem;
				height: .14rem;
				border-radius: .077rem;
			}
			
			.cell_Icon i {
				float: right;
				background: url(../img/selected.png) no-repeat center;
				background-size: 100%;
				margin: -.02rem;
				width: .18rem;
				height: .18rem;
				border-radius: 50%;
			}
			
			.pullIcon {
				width: 3.35rem;
				height: .2rem;
				padding: .2rem;
			}
			
			.bottomBgC {
				width: 100%;
				height: .1rem;
				background: url(../img/bottomBgC.png) no-repeat 0px 0px;
				background-size: 100%;
			}
			
			.pullIcon img {
				display: block;
				margin: 0 auto;
				width: .15rem;
				height: .15rem;
			}
			
			
			.pwd-box {
				margin: 0rem auto;
				width: 103%;
				padding-left: 6px;
				position: relative;
				border: 1px solid #9f9fa0;
				over-flow: hidden;
				height: .4rem;
			}
			
			.pwd-box input[type="tel"] {
				width: 100%;
				height: 45px;
				color: transparent;
				position: absolute;
				top: 0;
				left: 0;
				border: none;
				font-size: 18px;
				opacity: 0;
				z-index: 1;
				letter-spacing: 35px;
			}
			
			.fake-box input {
				width: .31rem;
				height: .4rem;
				border: none;
				border-right: 1px solid #e5e5e5;
				text-align: center;
				font-size: 30px;
			}
			
			.fake-box input:nth-last-child(1) {
				border: none;
			}
			
			.layer_dialog_box {
				padding: .1rem 0;
			}
			
			.layer_btn {
				display: block;
			    position: relative;
			    -webkit-box-flex: 1;
			    -webkit-flex: 1;
			    -ms-flex: 1;
			    flex: 1;
			    text-align: center;
			    letter-spacing: 1px;
			    color: #353535;
			    width: 1rem;
			    border-radius: .25rem;
			    background-color: #eee;
			    margin: 0rem .1rem;
			    box-shadow: 0 0 .1rem #919191
			}
			
			.layer_btn.layer_btn_primary {
				background-color: rgb(255, 85, 78);
				color: white;
			}
			
			.layer_btn+.layer_btn:after {
				content: " ";
				position: absolute;
				left: 0;
				top: 0;
				width: 1px;
				height: 100%;
				border-left: 0px solid white;
				color: #E4E4E4;
				-webkit-transform-origin: 0 0;
				transform-origin: 0 0;
				-webkit-transform: scaleX(.5);
				transform: scaleX(.5);
			}
			.layer_dialog_title {
				font-weight: 700;
			}
			
			.disOn {
				display: block;
			}
			
			.bankNameTest {
				display: none;
			}
			
			.repaymentDetailContent::before {
				content: "";
				width: 3.11rem;
				height: .01rem;
				border-top: .01rem dashed #ccc;
				position: absolute;
				left: .15rem;
				top: 9.5%;
			}
			
			.leftCirl,
			.rightCirl {
				width: .17rem;
				height: .17rem;
				background: linear-gradient(#b8dacf, #cededd, #CEDEDD);
				border-radius: 50%;
				position: absolute;
				top: 8%;
			}
			
			.leftCirl {
				left: -.1rem;
			}
			
			.rightCirl {
				right: -.1rem;
			}
		.userTips{
		    height: .34rem;
		    line-height: .34rem;
		    padding: 0 .16rem;
		    margin: 0 auto;
		    font-size: .13rem;
		    color: #fff;
		    background:rgba(255, 255, 255, 0.9);
        }
	    .leftImg,.rightImg{
		    width: .24rem!important;
		    height: .24rem;
		    position: static!important;
	        margin: .05rem .03rem 0 0;
	    }
	    .leftImg{
	    	float: left;
	    }
	 	marquee{
	    	float: left;
	    	width: 84%;
	    	color: RGBA(254, 55, 50, 1);
	    }
		.alert11{
			display: none;
		}
        .repayAlert1Wrap{
		    width: 100%;
		    height: 100%;
		    overflow: scroll;
		    position: absolute;
		    left: 50%;
		    top: 50%;
		    transform: translate(-50%, -50%);
		    z-index: 33;
        }
        .repayAlert1 {
		    width: 3.11rem;
		    background: #fff;
		    border-radius: .15rem;
		    margin: 1rem auto;
        }
        .alert1List1 {
            width: 3.11rem;
            height: .8rem;
            background: url(../img/repayBg1.png) no-repeat 0px 0px;
            background-size: 100% 100%;
        }
        .alert1ListTitle {
            display: block;
            font-size: .12rem;
            color: #fff;
            text-align: center;
            padding-top: .2rem;
        }
    	.alert1ListTips {
			display: block;
		    width: 100%;
		    font-size: .15rem;
		    color: #fff;
		    font-weight: bold;
		    text-align: center;
        }
        .alertTipsTitle{
			font-size: .15rem;
		    color: #1EB97E;
		    position: relative;
		    margin: 0 0 0 .1rem;
		    padding: .05rem 0 .05rem .05rem;
		    background: #fff;
        }
        .alertTipsTitle:before{
		    content: '';
		    width: .08rem;
		    height: .16rem;
		    background: #1EB97E;
		    position: absolute;
		    left: -.09rem;
		    top: .08rem;
		    border-radius: .25rem 0 0 .25rem;
		    z-index: 0;
        }
        .alert1ListItems{
    	    margin: .25rem .16rem 0;
        }
        .alert1ListItemsInfo{
			height: .4rem;
		    line-height: .4rem;
		    color: #1EB97E;
		    margin-top: .1rem;
		    background: #ededed;
		    border-radius: .05rem;
		    padding-left: .16rem;
        }
        .repayTatal::-webkit-input-placeholder{
        	color: #C7D2CC;
        	font-size: .17rem;
        }
        .repayTatal{
		    font-size: .23rem;
		    color: #1eb97e;
		    text-align: center;
		    font-weight: bold;
		    font-family: PingFang-SC-Regular;
        }
        .callNumber{
    	    display: inline-block;
		    float: right;
		    padding: 0 .11rem;
		    font-size: .12rem;
		    color: #fff;
		    background: #1EB97E;
		    border-radius: 0 .05rem .05rem 0;
        }
        .alert1ListItemsPic{
        	display: block;
		    width: 1.25rem;
		    margin: .15rem auto .3rem;
        }			
        .cancelBtn{
    	    display: block;
		    height: .45rem;
		    line-height: .45rem;
		    text-align: center;
		    font-size: .15rem;
		    color: #fff;
		    background: #1EB97E;
		    margin:0 .16rem .21rem;
		    border-radius: .25rem;
        }
		</style>
	</head>

	<body>
		<!-- 蒙版 -->
		<div class="layer_load">
			<div class="layer_mask"></div>
			<div class="layer_load_icon icon-loading"></div>
		</div>
	    <div class="alert11">
	        <div class='layer_mask'></div>
	        <div class="repayAlert1Wrap">
		        <div class="repayAlert1">
		            <div class="alert1List1">
		                <span class="alert1ListTitle">温馨提示您</span>
		                <span class="alert1ListTips">还款时谨防诈骗</span>
		            </div>
		            <div class="alert1ListItems">
		            	<h6 class="alertTipsTitle">还款时谨防诈骗</h6>
		            	<div class="alertTipsText">
							我们平台不会以个人名义通过微信、支付宝收取回款
		            	</div>
		            </div>
		            <div class="alert1ListItems">
		            	<h6 class="alertTipsTitle">请联系我们</h6>
		            	<div class="alertTipsText">
							还款过程如果有人冒充悟空招财工作人员收取您的额外费用，要求转账至个人微信或支付宝上，请联系我们：
		            	</div>
		            </div>
		            <div class="alert1ListItems">
		            	<h6>1.客服人员电话</h6>
		            	<div class="alert1ListItemsInfo">
			            	<span style="font-size: .15rem;">4001060216</span>
			            	<a class="callNumber" id="telephone">拨打电话</a>
		            	</div>
		            </div>
		            <div class="alert1ListItems">
		            	<h6>2.客服微信号</h6>
		            	<div class="alert1ListItemsInfo">
			            	<span style="display:inline-block;font-size: .15rem;">wukongservice</span>
		    	            <button class="callNumber" style="line-height: .4rem;" type="button" id="id_copy" data-clipboard-text="wukongservice">一键复制</button>
		            	</div>
		            </div>
		        	<div class="alert1ListItems">
		            	<h6>3.客服微信二维码</h6>
		                    <img class="alert1ListItemsPic" src="../img/wxCode.png" />
		            </div>
		           
	            	<a class='cancelBtn'>我知道了</a>
		            
		            <div style="width: 100%;height: 1px;"></div>
		        </div>
		    </div>    
	    </div>
	    <div style="background:#16b3b0;padding: .15rem 0 .1rem 0;">
		    <div class="userTips">
		    	<img class="leftImg" src="../img/userTips1.png">
		    	<marquee scrollamount="7"  direction="left" behavior="scroll">
		    		温馨提醒您：
					1.还款时谨防诈骗，我们平台不会以个人名义通过微信、支付宝 收取回款。
					2.还款过程如果有人冒充悟空钱包工作人员收取您的额外费用，要求转账至个人微信或支付宝上，请联系我们：
					官方微信：wukongservice
					唯一官方客服电话：   4001060216。
		    	</marquee>
		    	<img class="rightImg" src="../img/userTips22.png">
		    </div>
	    </div>
		<div class="repaymentContent">
			<div class="repayTop3">您发起还款申请后,我们会实时扣款,请确保您的银行卡余额充足,多次扣款失败可能会导致您还款失败。</div>
		</div>
		<div class="repaymentDetailContent">
			<div class="leftCirl"></div>
			<div class="rightCirl"></div>
			<div class="repayTop1"></div>
			<div class="repayTop2">
				<div class="repayTop2Text"><input class="repayTatal" type="number" autofocus="true" placeholder="请输入您需要还款的金额"/></div>
				<div class="repayTop2Text">应还金额(元)</div>
			</div>
			<div class="cells">
				<div class="cell">
					<label class="cell_hd">编号：</label>
					<div class="cell_cn">
						<input type="text" class="txt" placeholder="" readonly="" maxlength="20" value="" />
					</div>
				</div>
				<div class="cell">
					<label class="cell_hd">本金：</label>
					<div class="cell_cn">
						<input type="text" class="txt" placeholder="" readonly="" maxlength="20" value="" />
					</div>
				</div>
				<div class="cell">
					<label class="cell_hd">利息：</label>
					<div class="cell_cn">
						<input type="text" class="txt" placeholder="" readonly="" maxlength="20" value="" />
					</div>
				</div>
				<div class="cell">
					<label class="cell_hd">待还金额：</label>
					<div class="cell_cn">
						<input type="text" class="txt" placeholder="" readonly="" maxlength="20" />
					</div>
				</div>
				<div class="cell">
					<label class="cell_hd">还款方式：</label>
					<div class="cell_cn">
						<input type="text" class="txt" placeholder="部分还款" readonly="" maxlength="20" />
					</div>
				</div>
				<!-- <div class="cell">
					<label class="cell_hd">还款账户</label>
					<div class="cell_cn">

						<input type="text" class="txt inputTxt" placeholder="请输入还款账户" maxlength="20" />
					</div>
				</div>
				        <div class="cell bankNameTest">
	            <label class="cell_hd getBankName">建设银行</label>
	            <div class="cell_cn">
	                <div class="cell_Icon"><i></i></div>
	            </div>
	        </div> 
				<div class="cells_content">-->
					<div class="bankPay">
						<div class="cell">
							<label class="cell_hd">银行卡还款</label>
							<div class="cell_cn">
								<div class="cell_Icon"><i></i></div>
							</div>
						</div>
					</div>
					<!--<div class="ailPay">
						<div class="cell">
							<label class="cell_hd">支付宝还款</label>
							<div class="cell_cn">
								<div class="cell_Icon"></div>
							</div>
						</div>
					</div>
					<div class="cell test">
						<label class="cell_hd">线下还款（支付宝）</label>
						<div class="cell_cn">
							<div class="cell_Icon"></div>
						</div>
					</div>
				</div>-->
				<!--         <div class="pullIcon">
	            <img src="../images/pullIcon.png" alt="">
	        </div> -->
			</div>
			<div class="bottomBgC"></div>
			<div class="operatorContent confirmBtn">
				<div class="submitBtn">
					提交
				</div>
			</div>
		</div>
		<div class='layer_dialog confirm'>
			<div class='layer_mask'></div>
			<div class='layer_dialog_box'>
				<div class='layer_dialog_hd'>
					<span class='layer_dialog_title'>交易密码</span>
					<i class='layer_btn_close icon-close' style='display:none'></i>
				</div>
				<div class='layer_dialog_cn'>
					<div class="pwd-box">
						<input type="tel" maxlength="6" class="pwd-input" id="pwd-input">
						<div class="fake-box">
							<input type="password" readonly="">
							<input type="password" readonly="">
							<input type="password" readonly="">
							<input type="password" readonly="">
							<input type="password" readonly="">
							<input type="password" readonly="">
						</div>
					</div>
				</div>
				<div class='layer_dialog_ft'>
					<a class='layer_btn'>取消</a>
					<a class='layer_btn layer_btn_primary'>确认</a>
				</div>
			</div>
		</div>

		<!-- 脚本 -->
		<script src="../lib/zepto.min.js?rev=@@hash"></script>
		<script src="../js/main.js?rev=@@hash"></script>
		<script src="../js/clipboard.min.js"></script>   
		<script>
			(function(global, userUtil, layer) {
				var onlineBank = 0;
				var sessionId = userUtil.sid();
				var orderNo;
				var RefundAmount ;
        ////线上扣款    
        function onlineRepayRequest(){
        	layer.showLoad();
        	var _data = {
        		"orderNo" : orderNo,
        		"sessionId" : sessionId,
        		"RefundAmount" : RefundAmount
        	};
        	var repayZhifubaoStauts;
			$.ajax({
			   url: global.localUrl + "wallet/orders/onlineAnyRefund",
			   type: "post",
			   data: JSON.stringify(_data),
			   contentType: 'application/json;charset=utf-8',
			   success: function (re) {
			       if (1 == re.code) {
			           layer.tips("提交成功，请您耐心等候");
			           layer.hideLoad();
				        setTimeout(function(){
				        window.location.href="applyRecord.html";
				        },2000);
				    }else{
				       setTimeout(function(){
				                   },2000);
				                   layer.tips(re.message);
				                   layer.hideLoad();
	                }
			    },
	            error: function () {
	           		layer.hideLoad();
	                layer.tips(global.netError);
	            }
			});
        }		
        	            ///查看提示消息
	            $('.userTips').on('click',function(){
	            	$('.alert11').css('display','block');
	            })
                $('.cancelBtn').on('click',function(){
	            	$('.alert11').css('display','none');
	            })
	    		//一键复制
		        $("#id_copy").on('click',function () {   
		            var clipboard = new ClipboardJS("#id_copy");
		            layer.tips("复制成功")
		            clipboard.on("success", function (element) {//复制成功的回调   
		               console.log(element.text)
		            });
		            clipboard.on("error", function (element) {//复制失败的回调
		            	//console.log(element)
		            })
		        })
	            //////拨打客服电话
				$('#telephone').on("click",function(){
					var u = navigator.userAgent;
					var ios = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
					var android = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端	
					if(ios){
						$(this).attr("href","tel:4001060216");
					}else if(android){
						jsBridgess.kefuTel();
					}
				})	            
	            //拨打客服电话与app交互
	            var jsBridgess = (function () {   
	
	                function connectWebViewJavascriptBridge(callback) {
	                    if (window.WebViewJavascriptBridge) {
	                        callback(WebViewJavascriptBridge);
	                    } else {
	                        document.addEventListener('WebViewJavascriptBridgeReady', function () {
	                            callback(WebViewJavascriptBridge);
	                        }, false)
	                    }
	                }
	                return {
	                    init: function (fn) {
	                        connectWebViewJavascriptBridge(function (WebViewJavascriptBridge) {
	                            WebViewJavascriptBridge.init(function (message, responseCallback) {
	
	                            });
	
	                            fn && fn();
	
	                        })
	                    },    
	                    kefuTel: function (callback) {
	                        WebViewJavascriptBridge.callHandler('kefuTel', {"tel":"4001060216"}, function (response) { callback(response); });
	                    },
	                }
	            })();
            // 签约弹窗
            var layers = (function () {
                var _tips_timeout;
                return {          
			        alert1: function (obj) {
			            var conf = {
			                title: "提 示",
			                content: "您的银行卡还未签约，请先去签约后再来还款",
			                btnText: "确 定",
			                btnEvent: function () { }
			            };
			            if (typeof obj == "string") { obj = { content: obj } };
			            $.extend(conf, obj);
			            if ($(".alert").length == 0) {
			                $("body").append("<div class='layer_dialog alert'><div class='layer_mask'></div><div class='layer_dialog_box'><div class='layer_dialog_hd'><span class='layer_dialog_title'></span><i class='layer_btn_close icon-close' style='display:none'></i></div><div class='layer_dialog_cn'></div><div class='layer_dialog_ft'><a class='layer_btn layer_btn_primary'></a></div></div></div>");
			            }
			            $(".alert").addClass("on");
			            $(".alert .layer_dialog_title").text(conf.title);
			            $(".alert .layer_dialog_cn").html(conf.content);
			            $(".alert .layer_btn").text(conf.btnText).off("click").on("click", function () { conf.btnEvent(); close(); window.location.href="signbankTL.html"; });
			            $(".alert .layer_btn_close").off("click").on("click", function () { conf.btnEvent(); close(); });
			
			            function close() {
			                $(".alert").removeClass("on");
			            }
			        },
			        alert2: function (obj) {
			            var conf = {
			                title: "提 示",
			                content: "您的银行卡还未签约，请先去签约后再来还款",
			                btnText: "确 定",
			                btnEvent: function () { }
			            };
			            if (typeof obj == "string") { obj = { content: obj } };
			            $.extend(conf, obj);
			            if ($(".alert").length == 0) {
			                $("body").append("<div class='layer_dialog alert'><div class='layer_mask'></div><div class='layer_dialog_box'><div class='layer_dialog_hd'><span class='layer_dialog_title'></span><i class='layer_btn_close icon-close' style='display:none'></i></div><div class='layer_dialog_cn'></div><div class='layer_dialog_ft'><a class='layer_btn layer_btn_primary'></a></div></div></div>");
			            }
			            $(".alert").addClass("on");
			            $(".alert .layer_dialog_title").text(conf.title);
			            $(".alert .layer_dialog_cn").html(conf.content);
			            $(".alert .layer_btn").text(conf.btnText).off("click").on("click", function () { conf.btnEvent(); close(); window.location.href="signbankHJ.html"; });
			            $(".alert .layer_btn_close").off("click").on("click", function () { conf.btnEvent(); close(); });
			
			            function close() {
			                $(".alert").removeClass("on");
			            }
			        } 			        
                }
            })();	
            // 确认还款弹窗
            var confirmRepay = (function () {
                var _tips_timeout;
                return {          
			        confirm: function (obj) {
			            var conf = {
			                title: "提 示",
			                content: "您绑定的银行卡即将扣款，请确认有足够余额后进行下一步操作！",
			                btnOKText: "确 认",
			                btnCancelText: "取 消",
			                btnOKEvent: function () { },
			                btnCancelEvent: function () { }
			            };
			            $.extend(conf, obj);
			            if ($(".confirm").length == 0) {
			                $("body").append("<div class='layer_dialog confirm'><div class='layer_mask'></div><div class='layer_dialog_box'><div class='layer_dialog_hd'><span class='layer_dialog_title'></span><i class='layer_btn_close icon-close' style='display:none'></i></div><div class='layer_dialog_cn'></div><div class='layer_dialog_ft'><a class='layer_btn'></a><a class='layer_btn layer_btn_primary'></a></div></div></div>");
			            }
			            $(".confirm").addClass("on");
			            $(".confirm .layer_dialog_title").text(conf.title);
			            $(".confirm .layer_dialog_cn").html(conf.content);
			            $(".confirm .layer_btn").eq(0).text(conf.btnCancelText).off("click").on("click", function () { conf.btnCancelEvent(); close(); });
			            $(".confirm .layer_btn").eq(1).text(conf.btnOKText).off("click").on("click", function () { conf.btnOKEvent(); onlineRepayRequest(); close(); });
			            $(".confirm .layer_btn_close").off("click").on("click", function () { conf.btnCancelEvent(); close(); });
			
			            function close() {
			                $(".confirm").removeClass("on");
			            }
			        }                   
                }
            })();     
            
            
            ////////////////////////////////////////暂时停用////////////////////////////////////////////////////////
            $('.cancelBtn').on('click',function(){
            	$('.alert11').css('display','none');
            })
            $('.subBtn').on('click',function(){
	            var _data = {
	                "sessionId": sessionId,
	                "orderNo":orderNo,
	                "offineRefundType": 1
	            }
	            $.ajax({
	                url: global.localUrl + "wallet/orders/offlineRepay",
	                type: "post",
	                data: JSON.stringify(_data),
	                contentType: 'application/json;charset=utf-8',
	                success: function (re) {
	                    if (1 == re.code) {
	                        layer.tips("提交成功");
	                        setTimeout(function () {
	                        	window.location.href= "applyRecord.html";
								$('.alert11').css('display','none');
	                        }, 2000);
	                    }
	                    else {
	                        //setTimeout(function () {
	                            //window.location.reload();
	                        //}, 2000);
	                        layer.tips(re.message);
	                    }
	                },
	                error: function () {
	                    layer.tips(global.netError);
	                }
	            });
            	
            })
  
	             ////////////////////////////////////////暂时停用////////////////////////////////////////////////////////
				if(global.query) {
					orderNo = global.query['orderNo'];
				}

				$("body").height(document.documentElement.clientHeight);
				$(".submitBtn").click(function() {
		        	if(RefundAmount < 10){
	        		     layer.tips("最低还款金额不能小于10元");
	        		}else{
	        			confirmRepay.confirm();
	        		}

				})
				var $input = $(".fake-box input");
				$("#pwd-input").on("input", function() {
					var pwd = $(this).val().trim();
					for(var i = 0, len = pwd.length; i < len; i++) {
						$input.eq("" + i + "").val(pwd[i]);
					}
					$input.each(function() {
						var index = $(this).index();
						if(index >= len) {
							$(this).val("");
						}
					});
					if(len == 6) {
						//执行其他操作  
					}
				});
				$(".confirm .layer_btn").off("click").on("click", function() {
					close();
				});
				$(".confirm .layer_btn").eq(1).off("click").on("click", function() {
					var _data = {
						"sessionId": sessionId,
						"orderNo": orderNo,
						"payPassword": $(".fake-box input").eq(0).val() + $(".fake-box input").eq(1).val() + $(".fake-box input").eq(2).val() + $(".fake-box input").eq(3).val() + $(".fake-box input").eq(4).val() + $(".fake-box input").eq(5).val()
					}

					close();
				});
				$(".confirm .layer_btn_close").off("click").on("click", function() {
					close();
				});

				function close() {
					$(".confirm").removeClass("on");
				}

				$(".pullIcon").click(function() {
					if($(".cells_content").hasClass("disOn")) {
						$(".cells_content").removeClass("disOn");

						$(".pullIcon img").attr({
							"src": "../images/pullIcon.png"
						})
					} else {
						$(".cells_content").addClass("disOn");
						$(".pullIcon img").attr({
							"src": "../images/pullUp.png"
						})
					}
				})
	            $(".repayTatal").bind('input propertychange',function(){
	            	$(this).val($(this).val().replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'));
	            	RefundAmount = $(this).val();
	            });
				//初始化线上还款信息
				function onlineRepay() {
					var _data = {
						"sessionId": sessionId,
						"orderNo": orderNo, 
						"offineRefundType" : "2",
						"channelKey":"refund:road:off:no"
					}
					$.ajax({
						url: global.localUrl + "wallet/orders/onlineRefundAnyApply",
						type: "post",
						data: JSON.stringify(_data),
						contentType: 'application/json;charset=utf-8',
						success: function(re) {
							if(1 == re.code) {
								var paymentChannelName;
								for(var i = 0; i < re.data.sysPaymentChannelResponseList.length; i++) {
									if(re.data.sysPaymentChannelResponseList[i].type == 1) {
										paymentChannelName = re.data.sysPaymentChannelResponseList[i].paymentChannelName;
									}
								}
								$(".repayTop1").html(re.data.refundTime + "应还");
								$(".cell_cn input").eq(0).val(re.data.orderNo);
								$(".cell_cn input").eq(1).val(re.data.applyAmount + "元");
								$(".cell_cn input").eq(2).val(re.data.interest + "元");
								$(".cell_cn input").eq(3).val((re.data.refundAmount-re.data.alreadyRefundAmount)+"元");
	                            ////通过开关判断是否签约,repayChannnel为1，判断tonglianSignStatus是否签约；repayChannnel为2，判断huijuSignStatus是否签约；
	                            repayZhifubaoStauts = re.data.repayZhifubao;
	                            if(re.data.repayZhifubao == "1"){
	                            	$('.bankPay .cell_hd').html('支付宝还款');
	                            }else{
	                            	$('.bankPay .cell_hd').html('银行卡还款');
		                            if(re.data.repayChannnel == "1"){
			                            if(re.data.tonglianSignStatus == 0){
			                            	layers.alert1();
			                            }
		                            }else if(re.data.repayChannnel == "2"){
		                            	if(re.data.huijuSignStatus == 0){
			                            	layers.alert2();
			                            }
		                            }                           	
	                            }
	    
	                            
							} else {

								layer.tips(re.message);
							}
						},
						error: function() {
							layer.tips(global.netError);
						}
					});
				}
				onlineRepay();
			})(global, userUtil, layer)
		</script>
	</body>

</html>